package com.cmnit.analysis.application

import java.util.Date

import com.cmnit.analysis.common.TApplication
import com.cmnit.analysis.controller.DayTollClearingController
import com.cmnit.analysis.util.ServiceUtil
import org.apache.log4j.Logger


object DayTollClearingApplication extends TApplication {

  val logger: Logger = Logger.getLogger(this.getClass)
  private val controller = new DayTollClearingController

  def run(acctTime: String): Unit = {
    start("DayTollClearing") {

      if (acctTime.isEmpty)
        controller.controller(ServiceUtil.getLastDayAcctDate(new Date))
      else
        controller.controller(acctTime)
    }
  }
}
